package com.gusto.engine.repository.dao;

import java.util.List;

import com.gusto.engine.beans.exceptions.ResCreationException;
import com.gusto.engine.beans.model.Res;
import com.gusto.engine.repository.exception.RepositoryException;
import com.gusto.engine.repository.params.Param;

/**
 * <p>Defines a Generic DataAccess interface for the resources.</p>
 * 
 * @author amokrane.belloui@gmail.com
 */
public interface RepositoryDAO {
	
	/**
	 * Get a resource from it's identifier
	 * @param params parameters for getting a resource, depending on the type of repository
	 * @return
	 * @throws ResCreationException
	 */
	public Res getResource(Object... params) throws ResCreationException, RepositoryException;
	
	/**
	 * Querying the repository : a query string and parameters
	 * @param queryString
	 * @param params
	 * @return
	 */
	public List<Res> query(String queryString, Param[] queryParams, Object... params) throws ResCreationException, RepositoryException;
	
}
